export module shareUtils{
    export function buildPathQuery(path:string) :string{
        // debugger
        if (path != 'pages/index/index' && path !='pages/pk/index'
            && path !='pages/categories/index'&& path !='pages/example/index'
        ) {
            if (path.includes('?')) {
                let _p = path.split('?')
                const base_path = _p[0]
                const query = _p[1]
                const queries = query.split('&')
                let shared_tag = 0;
                queries.forEach(q=>{
                    if(q === 'showHomeBtn=1'){
                        shared_tag = 1
                    }
                })
                if(shared_tag === 0){
                    queries.push('showHomeBtn=1')
                    const query_with_share = queries.join('&')
                    path = [base_path, query_with_share].join('?')
                }
    
            }else{
                path = [path,'showHomeBtn=1'].join('?')
            }
            
        }
        // debugger
       
        return path
    }
}